<template>
  <common-info-dialog
    :visible.sync="dialogShow"
    @cancel="close"
    :infoLoading="infoLoading"
    :title="dialogTitle"
  >
    <common-info-table>
      <common-info-table-cell label="任务名称" width="50%"
        >{{ detail.nmapName }}
      </common-info-table-cell>
      <!-- <common-info-table-cell label="扫描方式" width="50%"
        >{{ detail.scanType === "0" ? "主机扫描" : "端口扫描" }}
      </common-info-table-cell> -->
      <common-info-table-cell label="IP段" width="50%"
        >{{ detail.nmapIps }}
      </common-info-table-cell>
      <!-- <common-info-table-cell
        label="端口段"
        width="50%"
        v-if="currentType !== 'ANALYSIS'"
        >{{ detail.nmapPorts }}
      </common-info-table-cell> -->
      <common-info-table-cell label="执行周期" width="50%"
        >{{ detail.jobCycleString }}
      </common-info-table-cell>
      <common-info-table-cell label="创建时间" width="50%"
        >{{ detail.createTime }}
      </common-info-table-cell>
    </common-info-table>
  </common-info-dialog>
</template>

<script>
export default {
  props: {
    currentType: {
      type: String,
      default: "",
    },
  },
  components: {},
  data() {
    return {
      dialogTitle: "",
      dialogShow: false,
      detail: {},
      results: [],
      infoLoading: false,
    };
  },
  computed: {},
  methods: {
    /**
     * 关闭
     */
    close() {
      this.dialogShow = false;
    },
    /**
     * 显示
     */
    show(data) {
      this.dialogTitle = "详情";
      this.detail = data.id ? data : {};
      this.dialogShow = true;
    },
  },
};
</script>

<style lang="scss" scoped></style>
